/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package uimigration.Interactions.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;

import uimigration.Interactions.Action;
import uimigration.Interactions.ActivateNavigation;
import uimigration.Interactions.InteractionsPackage;
import uimigration.Interactions.Layout;
import uimigration.Plateform.Device;
import uimigration.mappingmodel.BehaviourType;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Activate Navigation</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link uimigration.Interactions.impl.ActivateNavigationImpl#getWidgetOrder <em>Widget Order</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ActivateNavigationImpl extends BehaviourImpl implements
		ActivateNavigation {
	/**
	 * The default value of the '{@link #getWidgetOrder() <em>Widget Order</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getWidgetOrder()
	 * @generated
	 * @ordered
	 */
	protected static final Layout WIDGET_ORDER_EDEFAULT = Layout.LEFT;
	/**
	 * The cached value of the '{@link #getWidgetOrder() <em>Widget Order</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getWidgetOrder()
	 * @generated
	 * @ordered
	 */
	protected Layout widgetOrder = WIDGET_ORDER_EDEFAULT;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ActivateNavigationImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return InteractionsPackage.Literals.ACTIVATE_NAVIGATION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Layout getWidgetOrder() {
		return widgetOrder;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setWidgetOrder(Layout newWidgetOrder) {
		Layout oldWidgetOrder = widgetOrder;
		widgetOrder = newWidgetOrder == null ? WIDGET_ORDER_EDEFAULT : newWidgetOrder;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, InteractionsPackage.ACTIVATE_NAVIGATION__WIDGET_ORDER, oldWidgetOrder, widgetOrder));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case InteractionsPackage.ACTIVATE_NAVIGATION__WIDGET_ORDER:
				return getWidgetOrder();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case InteractionsPackage.ACTIVATE_NAVIGATION__WIDGET_ORDER:
				setWidgetOrder((Layout)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case InteractionsPackage.ACTIVATE_NAVIGATION__WIDGET_ORDER:
				setWidgetOrder(WIDGET_ORDER_EDEFAULT);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case InteractionsPackage.ACTIVATE_NAVIGATION__WIDGET_ORDER:
				return widgetOrder != WIDGET_ORDER_EDEFAULT;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuffer result = new StringBuffer(super.toString());
		result.append(" (widgetOrder: ");
		result.append(widgetOrder);
		result.append(')');
		return result.toString();
	}

	public void trigger(Device d, Action a) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setType(BehaviourType value) {
		// TODO Auto-generated method stub

	}

} //ActivateNavigationImpl
